//
//  NewsReleaseController.m
//  yameishe3
//
//  Created by pro on 2017/3/10.
//  Copyright © 2017年 yameishe. All rights reserved.
//

#import "NewsReleaseController.h"
#import "NewsReleaseEditView.h"
#define editViewH 570
@interface NewsReleaseController ()
{
    __weak IBOutlet UIScrollView *_scrollView;
    NewsReleaseEditView *_editView;
}
@end

@implementation NewsReleaseController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self controllerSetting];
    
   
    _editView = [[[NSBundle mainBundle]loadNibNamed:@"NewsReleaseEditView" owner:self options:nil] firstObject];
    _editView.frame = CGRectMake(0, 0, _scrollView.width, ScreenHeight);
    [_scrollView addSubview:_editView];
    [_editView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(_scrollView);
        make.leading.trailing.equalTo(self.view);
        make.height.equalTo(@(editViewH));
    }];

}

-(void)viewWillDisappear:(BOOL)animated {
    // 反注册键盘
    [super viewWillDisappear:YES];
    [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillHideNotification object:nil];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
